package com.efuture.jdbctemplate;

import com.efuture.druid.DruidUtils;
import org.springframework.jdbc.core.JdbcTemplate;

/**
 * @ClassNAME JdbcTemplateDeleteData
 * @Description 使用JdbcTemplate删除数据
 * @Author zhaoshanshan
 * @Date 2021/9/20 9:42 下午
 * @Version 1.0
 */
public class JdbcTemplateDeleteData {

    public static void main(String[] args) {
        try{
            JdbcTemplate jdbcTemplate = new JdbcTemplate(DruidUtils.getDataSource());
            String sql = "delete from emp where id = ?";
            jdbcTemplate.update(sql,1015);

        }catch (Exception e){
            e.printStackTrace();;
        }

    }
}